import { request } from '../../utils/request';
import { IPage } from '../index';

export interface ICourseSelectionInfo {
  userId: string;
  username: string;
  courseId: string;
  avatar: string;
  /**
   * 课程名字
   */
  name: string;

  /**
   * 图片url
   */
  picture: string;

  /**
   * 上课时间
   */
  courseTime: string;

  /**
   * 教练姓名
   */
  teacherName: string;

  /**
   * 开课时间
   */
  startTime: string;
}

export const getCourseSelectList = (data: any) =>
  request<IPage<ICourseSelectionInfo>>({
    url: '/course_selection/listAll',
    method: 'post',
    data,
  });
